package st.business.tepth.business.history;

import java.util.List;

import io.reactivex.disposables.Disposable;
import st.business.tepth.base.OnDataConvertListener;
import st.business.tepth.business.bean.HistoryConditionBean;
import st.business.tepth.business.bean.HistoryResultBean;
import st.shadow.library.core.base.mvp.BaseModel;
import st.shadow.library.core.base.mvp.BasePresenter;
import st.shadow.library.core.base.mvp.BaseView;

/**
 * Author: shadow
 * Email:  1025431817@qq.com
 * Time:   2019-03-02 15:39
 */

public interface HistoryContract {
    interface View extends BaseView {
        void showCondition(HistoryConditionBean conditionBean);

        void showError(String msg);

        void showHistoryResult(boolean isRefresh,List<HistoryResultBean> list);
    }

    interface Model extends BaseModel {
        Disposable getCondition(String token, OnDataConvertListener<HistoryConditionBean>
                listener);

        Disposable getHistoryData(String token, String busNumber, String startDate,
                                  String endDate, String classification,
                                  String workType, int pageSize, int pageNumber,
                                  OnDataConvertListener<List<HistoryResultBean>> listener);
    }

    abstract class Presenter extends BasePresenter<View> {
        abstract void getCondition(String token);

        abstract void getHistoryData(boolean isRefresh,String token, String busNumber, String startDate,
                                     String endDate, String classification,
                                     String workType, int pageSize, int pageNumber);
    }
}
